import './mock';
import Vue from 'vue';
import App from './App.vue';
import './styles/global.less';
import router from './router';
import { showMessage } from './utils';
import './enentBus';
import store from './store';

// 全局设置触发
store.dispatch("setting/fetchSetting");

// 将消息提示挂载到原型上，方便全局调用
Vue.prototype.$showMessage = showMessage;




// 注册全局指令
import vloading from './directives/loading';
import vLazy from './directives/lazy';
Vue.directive("loading", vloading);
Vue.directive("lazy", vLazy);

// 配置
new Vue({
  store,
  router,
  render: h => h(App),
}).$mount('#app')